package d3_charset;

import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;

public class t8characterwriter {
    public static void main(String[] args) {
        try (Writer fw =new FileWriter("src\\111");
        ){
            fw.write('a');
            fw.write(49);
            fw.write('大');
            fw.write("\r\n");

            fw.write("大多数踩踩踩");

            fw.write("说法帆帆帆帆",0,4);

            char[] buffer = {'d','s','是','s','的','s','s','s','s','s'};
            fw.write(buffer);

            fw.write(buffer,0,3);

            fw.flush();//刷新流

            fw.close();//关闭流包含刷新流

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
